<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wwwApp: summary.php File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">wwwApp
   </div>
   <div id="projectbrief">A web app for workshop organizing, recruitment and qualification</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">summary.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="summary_8php_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab8f76c7a5a2e084cf121c1f008e7d6cc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="summary_8php.html#ab8f76c7a5a2e084cf121c1f008e7d6cc">actionShowCorrelation</a> ()</td></tr>
<tr class="memitem:a22c76b81e76e0215a565d938739372af"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="summary_8php.html#a22c76b81e76e0215a565d938739372af">actionListPersonalData</a> ()</td></tr>
<tr class="memitem:ae85fff9fcae35ade06b632d496a537d9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="summary_8php.html#ae85fff9fcae35ade06b632d496a537d9">actionListArrivalData</a> ($comments=true)</td></tr>
<tr class="memitem:a1b9a2f9fb7946fa5541c7f1138cf6445"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="summary_8php.html#a1b9a2f9fb7946fa5541c7f1138cf6445">actionListDailyCounts</a> ()</td></tr>
<tr class="memitem:a63074bc210dc044f5dc0fe9f5f334eb1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="summary_8php.html#a63074bc210dc044f5dc0fe9f5f334eb1">sqlUserIsQualified</a> ($edition=null)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ae85fff9fcae35ade06b632d496a537d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionListArrivalData </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$comments</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="summary_8php_source.html#l00132">132</a> of file <a class="el" href="summary_8php_source.html">summary.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global $USER, <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>, <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;adminUsers&#39;</span>))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line">        $PAGE-&gt;title = _(<span class="stringliteral">&#39;List of arrival data&#39;</span>);</div>
<div class="line">        <span class="keywordflow">if</span> (!isset($_GET[<span class="stringliteral">&#39;print&#39;</span>]))</div>
<div class="line">        {</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;a class=&quot;right&quot; href=&quot;?print&quot;&gt;&#39;</span> ._(<span class="stringliteral">&#39;printable version&#39;</span>). <span class="stringliteral">&#39;&lt;/a&gt;&#39;</span>;</div>
<div class="line">                <span class="keywordflow">if</span> ($comments)</div>
<div class="line">                        echo <span class="stringliteral">&#39;&lt;a href=&quot;listArrivalData(0)&quot;&gt;&#39;</span>. _(<span class="stringliteral">&#39;without comments&#39;</span>) .<span class="stringliteral">&#39;&lt;/a&gt;&#39;</span>;</div>
<div class="line">                <span class="keywordflow">else</span></div>
<div class="line">                        echo <span class="stringliteral">&#39;&lt;a href=&quot;listArrivalData(1)&quot;&gt;&#39;</span>. _(<span class="stringliteral">&#39;with comments&#39;</span>) .<span class="stringliteral">&#39;&lt;/a&gt;&#39;</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        $headers = array(</div>
<div class="line">                <span class="stringliteral">&#39;name&#39;</span>          =&gt; _(<span class="stringliteral">&#39;full name&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;telephone&#39;</span>     =&gt; _(<span class="stringliteral">&#39;phone number&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;staybegintime&#39;</span> =&gt; _(<span class="stringliteral">&#39;arrival&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;stayendtime&#39;</span>   =&gt; _(<span class="stringliteral">&#39;departure&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;gatherplace&#39;</span>   =&gt; _(<span class="stringliteral">&#39;gathering&#39;</span>));</div>
<div class="line">                <span class="comment">//parenttelephone?</span></div>
<div class="line">        <span class="keywordflow">if</span> ($comments)</div>
<div class="line">        {</div>
<div class="line">                $headers[<span class="stringliteral">&#39;comments&#39;</span>]= _(<span class="stringliteral">&#39;comments&#39;</span>);</div>
<div class="line">                $headers[<span class="stringliteral">&#39;lastmodification&#39;</span>]= _(<span class="stringliteral">&#39;last mod.&#39;</span>);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        $users = $DB-&gt;query(<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                SELECT &#39;</span>. implode(<span class="charliteral">&#39;,&#39;</span>, array_keys($headers)) .<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                FROM table_users u, table_edition_users eu</span></div>
<div class="line"><span class="stringliteral">                WHERE u.uid=eu.uid AND eu.edition=$1 AND eu.qualified&gt;0</span></div>
<div class="line"><span class="stringliteral">                ORDER BY u.gatherplace DESC, eu.staybegintime, u.ordername</span></div>
<div class="line"><span class="stringliteral">        &#39;</span>, <a class="code" href="utils_8php.html#a86acce3c002ca1af709fd1b04f2f82fa">getOption</a>(<span class="stringliteral">&#39;currentEdition&#39;</span>));</div>
<div class="line"></div>
<div class="line">        $rows = array();</div>
<div class="line">        <span class="keywordflow">foreach</span> ($users as $user)</div>
<div class="line">        {</div>
<div class="line">                <span class="keywordflow">if</span> (!is_null($user[<span class="stringliteral">&#39;staybegintime&#39;</span>]))</div>
<div class="line">                        $user[<span class="stringliteral">&#39;staybegintime&#39;</span>] = strftime(<span class="stringliteral">&#39;%a %e. %H:%M&#39;</span>, $user[<span class="stringliteral">&#39;staybegintime&#39;</span>]);</div>
<div class="line">                <span class="keywordflow">if</span> (!is_null($user[<span class="stringliteral">&#39;stayendtime&#39;</span>]))</div>
<div class="line">                        $user[<span class="stringliteral">&#39;stayendtime&#39;</span>]   = strftime(<span class="stringliteral">&#39;%a %e. %H:%M&#39;</span>, $user[<span class="stringliteral">&#39;stayendtime&#39;</span>]  );</div>
<div class="line">                <span class="keywordflow">if</span> (!is_null($user[<span class="stringliteral">&#39;lastmodification&#39;</span>]))</div>
<div class="line">                {</div>
<div class="line">                        $t = $user[<span class="stringliteral">&#39;lastmodification&#39;</span>];</div>
<div class="line">                        $user[<span class="stringliteral">&#39;lastmodification&#39;</span>] = strftime(<span class="stringliteral">&#39;%Y-%m-%d&#39;</span>, $t);</div>
<div class="line">                        <span class="comment">// Highlight if older than 300 days</span></div>
<div class="line">                        <span class="keywordflow">if</span> ($t &lt; time() -  300 * 24 * 60 * 60)</div>
<div class="line">                                $user[<span class="stringliteral">&#39;lastmodification&#39;</span>] = <span class="stringliteral">&#39;&lt;span style=&quot;color:#a00&quot;&gt;&#39;</span>. $user[<span class="stringliteral">&#39;lastmodification&#39;</span>] . <span class="stringliteral">&#39;&lt;/span&gt;&#39;</span>;</div>
<div class="line">                }</div>
<div class="line">                <span class="keywordflow">if</span> ($user[<span class="stringliteral">&#39;gatherplace&#39;</span>] == <span class="stringliteral">&#39;none&#39;</span>)</div>
<div class="line">                        $user[<span class="stringliteral">&#39;gatherplace&#39;</span>] = <span class="stringliteral">&#39; - &#39;</span>;</div>
<div class="line">                <span class="keywordflow">else</span></div>
<div class="line">                        $user[<span class="stringliteral">&#39;gatherplace&#39;</span>] = ucfirst($user[<span class="stringliteral">&#39;gatherplace&#39;</span>]);</div>
<div class="line"></div>
<div class="line">                $rows[] = $user;</div>
<div class="line">        }</div>
<div class="line">        <a class="code" href="template_8php.html#a3bbebc058e2a5749c5129ef04f2db578">buildTableHTML</a>($rows, $headers);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a1b9a2f9fb7946fa5541c7f1138cf6445"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionListDailyCounts </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="summary_8php_source.html#l00191">191</a> of file <a class="el" href="summary_8php_source.html">summary.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>,<a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;adminUsers&#39;</span>))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line">        $PAGE-&gt;title = _(<span class="stringliteral">&#39;List of meal data&#39;</span>);</div>
<div class="line">        $edition = $DB-&gt;editions[<a class="code" href="utils_8php.html#a86acce3c002ca1af709fd1b04f2f82fa">getOption</a>(<span class="stringliteral">&#39;currentEdition&#39;</span>)]-&gt;assoc(<span class="charliteral">&#39;*&#39;</span>);</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (!isset($_GET[<span class="stringliteral">&#39;print&#39;</span>]))</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;a class=&quot;right&quot; href=&quot;?print&quot;&gt;&#39;</span>. _(<span class="stringliteral">&#39;printable version&#39;</span>) .<span class="stringliteral">&#39;&lt;/a&gt;&#39;</span>;</div>
<div class="line"></div>
<div class="line">        $DB-&gt;query(<span class="stringliteral">&#39;SELECT COUNT(*) FROM table_edition_users</span></div>
<div class="line"><span class="stringliteral">                        WHERE edition=$1 AND qualified&gt;0</span></div>
<div class="line"><span class="stringliteral">                                        AND (staybegintime IS NULL OR stayendtime IS NULL</span></div>
<div class="line"><span class="stringliteral">                                             OR staybegintime &lt; $2 OR stayendtime &lt; $2)&#39;</span>,</div>
<div class="line">                                $edition[<span class="stringliteral">&#39;edition&#39;</span>], $edition[<span class="stringliteral">&#39;begintime&#39;</span>]);</div>
<div class="line">        echo _(<span class="stringliteral">&#39;Number of qualified users who didn\&#39;t specify their staying time:&#39;</span>).<span class="charliteral">&#39; &#39;</span>. $DB-&gt;fetch();</div>
<div class="line">        echo <span class="stringliteral">&#39; (&#39;</span>. _(<span class="stringliteral">&#39;see&#39;</span>) .<span class="stringliteral">&#39; &lt;a href=&quot;listPersonalData&quot;&gt;&#39;</span>. _(<span class="stringliteral">&#39;list of personal data&#39;</span>) .<span class="stringliteral">&#39;&lt;/a&gt;)&lt;br/&gt;&#39;</span>;</div>
<div class="line">        $DB-&gt;query(<span class="stringliteral">&#39;SELECT COUNT(*) FROM table_edition_users</span></div>
<div class="line"><span class="stringliteral">                        WHERE edition=$1 AND qualified&gt;0 AND isselfcatered&gt;0&#39;</span>, $edition[<span class="stringliteral">&#39;edition&#39;</span>]);</div>
<div class="line">        echo _(<span class="stringliteral">&#39;Number of qualified users who will get accommodation and meals on their own:&#39;</span>).<span class="charliteral">&#39; &#39;</span>. $DB-&gt;fetch();</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">        $hours = explode(<span class="charliteral">&#39; &#39;</span>, $edition[<span class="stringliteral">&#39;importanthours&#39;</span>]);</div>
<div class="line">        $headers = array(_(<span class="stringliteral">&#39;day&#39;</span>));</div>
<div class="line">        <span class="keywordflow">foreach</span> ($hours as $h)</div>
<div class="line">                $headers[]= <span class="stringliteral">&quot;$h:00&quot;</span>;</div>
<div class="line">        $rows = array();</div>
<div class="line">        $starttime = $edition[<span class="stringliteral">&#39;begintime&#39;</span>];</div>
<div class="line">        $starttime -= 60*60*strftime(<span class="stringliteral">&#39;%H&#39;</span>, $starttime);</div>
<div class="line">        <span class="keywordflow">for</span> ($day=0; $starttime + $day*24*60*60 &lt;= $edition[<span class="stringliteral">&#39;endtime&#39;</span>]; $day++)</div>
<div class="line"></div>
<div class="line">        {</div>
<div class="line">                $time = $starttime + $day*24*60*60;</div>
<div class="line">                $row = array(strftime(<span class="stringliteral">&quot;%a %e.&quot;</span>, $time+9*60*60));</div>
<div class="line">                $query = <span class="stringliteral">&#39;SELECT COUNT(*) FROM table_edition_users</span></div>
<div class="line"><span class="stringliteral">                              WHERE edition=$1 AND qualified &gt; 0</span></div>
<div class="line"><span class="stringliteral">                                    AND staybegintime&lt;=$2 AND stayendtime&gt;=$2</span></div>
<div class="line"><span class="stringliteral">                                    AND isselfcatered=0</span></div>
<div class="line"><span class="stringliteral">                                    &#39;</span>;</div>
<div class="line">                <span class="keywordflow">foreach</span> ($hours as $h)</div>
<div class="line">                        $row[]= $DB-&gt;query($query, $edition[<span class="stringliteral">&#39;edition&#39;</span>], $time+$h*3600)-&gt;fetch();</div>
<div class="line">                $rows[]= $row;</div>
<div class="line">        }</div>
<div class="line">        <a class="code" href="template_8php.html#a3bbebc058e2a5749c5129ef04f2db578">buildTableHTML</a>($rows, $headers);</div>
<div class="line"></div>
<div class="line">        $tshirtsizes = array(<span class="stringliteral">&#39;XS&#39;</span>,<span class="charliteral">&#39;S&#39;</span>,<span class="charliteral">&#39;M&#39;</span>,<span class="charliteral">&#39;L&#39;</span>,<span class="stringliteral">&#39;XL&#39;</span>,<span class="stringliteral">&#39;XXL&#39;</span>);</div>
<div class="line">        echo <span class="stringliteral">&#39;&lt;h4&gt;&#39;</span> ._(<span class="stringliteral">&#39;T-shirt sizes&#39;</span>) .<span class="stringliteral">&#39;&lt;/h4&gt;&#39;</span>;</div>
<div class="line">        $rows = array();</div>
<div class="line">        $query = <span class="stringliteral">&#39;SELECT COUNT(*) FROM table_users u WHERE &#39;</span>. <a class="code" href="summary_8php.html#a63074bc210dc044f5dc0fe9f5f334eb1">sqlUserIsQualified</a>() .<span class="stringliteral">&#39; AND u.tshirtsize=$1&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($tshirtsizes as $t)</div>
<div class="line">                $rows[]= array($t, $DB-&gt;query($query, $t)-&gt;fetch());</div>
<div class="line">        <a class="code" href="template_8php.html#a3bbebc058e2a5749c5129ef04f2db578">buildTableHTML</a>($rows);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a22c76b81e76e0215a565d938739372af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionListPersonalData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="summary_8php_source.html#l00096">96</a> of file <a class="el" href="summary_8php_source.html">summary.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global $USER, <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>, <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        <span class="keywordflow">if</span> (!<a class="code" href="user_2utils_8php.html#a1e9c8ed2c5ed2def1a367c9ffd04114b">userCan</a>(<span class="stringliteral">&#39;adminUsers&#39;</span>))  <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="classPolicyException.html">PolicyException</a>();</div>
<div class="line">        $PAGE-&gt;title = _(<span class="stringliteral">&#39;List of personal data&#39;</span>);</div>
<div class="line">        <span class="keywordflow">if</span> (!isset($_GET[<span class="stringliteral">&#39;print&#39;</span>]))</div>
<div class="line">        {</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;a class=&quot;right&quot; href=&quot;?print&quot;&gt;&#39;</span>. _(<span class="stringliteral">&#39;printable version&#39;</span>) .<span class="stringliteral">&#39;&lt;/a&gt;&lt;br/&gt;&#39;</span>;</div>
<div class="line">                $users = $DB-&gt;query(<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                        SELECT u.name, u.email FROM table_users u</span></div>
<div class="line"><span class="stringliteral">                        WHERE &#39;</span>. <a class="code" href="summary_8php.html#a63074bc210dc044f5dc0fe9f5f334eb1">sqlUserIsQualified</a>() .<span class="stringliteral">&#39; AND u.pesel IS NULL AND u.telephone IS NULL</span></div>
<div class="line"><span class="stringliteral">                        ORDER BY u.ordername</span></div>
<div class="line"><span class="stringliteral">                &#39;</span>);</div>
<div class="line">                echo _(<span class="stringliteral">&#39;Persons who did not fill their data: &#39;</span>);</div>
<div class="line">                $emails = array();</div>
<div class="line">                <span class="keywordflow">foreach</span> ($users as $user)</div>
<div class="line">                        $emails[]= $user[<span class="stringliteral">&#39;name&#39;</span>] .<span class="stringliteral">&#39; &amp;lt;&#39;</span>. $user[<span class="stringliteral">&#39;email&#39;</span>]. <span class="stringliteral">&#39;&amp;gt;&#39;</span>;</div>
<div class="line">                echo implode(<span class="stringliteral">&#39;, &#39;</span>,$emails) .<span class="charliteral">&#39;.&#39;</span>;</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        $headers = array(</div>
<div class="line">                <span class="stringliteral">&#39;name&#39;</span> =&gt; _(<span class="stringliteral">&#39;full name&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;telephone&#39;</span> =&gt; _(<span class="stringliteral">&#39;phone number&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;parenttelephone&#39;</span> =&gt; _(<span class="stringliteral">&#39;parent\&#39;s phone&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;pesel&#39;</span>           =&gt; _(<span class="stringliteral">&#39;PESEL&#39;</span>),</div>
<div class="line">                <span class="stringliteral">&#39;address&#39;</span>         =&gt; _(<span class="stringliteral">&#39;address&#39;</span>)</div>
<div class="line">        );</div>
<div class="line">        $rows = $DB-&gt;query(<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                SELECT u.&#39;</span>. implode(<span class="stringliteral">&#39;, u.&#39;</span>, array_keys($headers)) .<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                FROM table_users u</span></div>
<div class="line"><span class="stringliteral">                WHERE &#39;</span>. <a class="code" href="summary_8php.html#a63074bc210dc044f5dc0fe9f5f334eb1">sqlUserIsQualified</a>() .<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                ORDER BY u.pesel IS NULL AND u.telephone IS NULL DESC, u.ordername</span></div>
<div class="line"><span class="stringliteral">        &#39;</span>);</div>
<div class="line">        <a class="code" href="template_8php.html#a3bbebc058e2a5749c5129ef04f2db578">buildTableHTML</a>($rows, $headers);</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab8f76c7a5a2e084cf121c1f008e7d6cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">actionShowCorrelation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="summary_8php_source.html#l00003">3</a> of file <a class="el" href="summary_8php_source.html">summary.php</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        global <a class="code" href="common_8php.html#a7dc56dc8b18ad37272b56fa7395bedef">$DB</a>, <a class="code" href="index_8php.html#ae1848ae8dc4014bc7c680e5504a8eef0">$PAGE</a>;</div>
<div class="line">        $DB-&gt;query(<span class="stringliteral">&#39;SELECT wid,title  FROM table_workshops</span></div>
<div class="line"><span class="stringliteral">                    WHERE edition=$1 AND type=$2 AND status=$3  ORDER BY title&#39;</span>,</div>
<div class="line">                <a class="code" href="utils_8php.html#a86acce3c002ca1af709fd1b04f2f82fa">getOption</a>(<span class="stringliteral">&#39;currentEdition&#39;</span>), <a class="code" href="enum_8php.html#a11cd73ec04448245e92daedfab9c2bdd">enumBlockType</a>(<span class="stringliteral">&#39;workshop&#39;</span>)-&gt;<span class="keywordtype">id</span>, <a class="code" href="enum_8php.html#a5fba087a3870146b12b7b12c9bfc7d11">enumBlockStatus</a>(<span class="stringliteral">&#39;accepted&#39;</span>)-&gt;<span class="keywordtype">id</span></div>
<div class="line">        );</div>
<div class="line">        $workshops = $DB-&gt;fetch_all();</div>
<div class="line"></div>
<div class="line">        $PAGE-&gt;title = _(<span class="stringliteral">&#39;Correlation matrix&#39;</span>);</div>
<div class="line">        echo  _(<span class="stringliteral">&#39;For each pair of workshops the number of qualified users &#39;</span>.</div>
<div class="line">                <span class="stringliteral">&#39;accepted for both is shown (including lecturers and staff).&lt;br/&gt;&#39;</span>.</div>
<div class="line">                <span class="stringliteral">&#39;You can single out a principal minor by clicking on rows.&#39;</span>);</div>
<div class="line">        echo  <span class="stringliteral">&#39;&lt;table style=&quot;text-align:center;&quot;&gt;&lt;tr class=&quot;odd&quot;&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&#39;</span>;</div>
<div class="line">        $class = <span class="stringliteral">&#39;third&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($workshops as $w1)</div>
<div class="line">        {</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;td class=&quot;&#39;</span>. $class .<span class="stringliteral">&#39;&quot;&gt;&lt;b&gt;&lt;a&#39;</span>. <a class="code" href="template_8php.html#a9b9585537fe5238d4d5b54478251ccfa">getTipJS</a>($w1[<span class="stringliteral">&#39;title&#39;</span>]).<span class="charliteral">&#39;&gt;&#39;</span>.</div>
<div class="line">                        $w1[<span class="stringliteral">&#39;wid&#39;</span>] .<span class="stringliteral">&#39;&lt;/a&gt;&lt;/b&gt;&lt;/td&gt;&#39;</span>;</div>
<div class="line">                $class = ($class==<span class="stringliteral">&#39;even&#39;</span>)?<span class="stringliteral">&#39;odd&#39;</span>:(($class==<span class="stringliteral">&#39;odd&#39;</span>)?<span class="stringliteral">&#39;third&#39;</span>:<span class="stringliteral">&#39;even&#39;</span>);</div>
<div class="line">        }</div>
<div class="line">        $class = <span class="stringliteral">&#39;third&#39;</span>;</div>
<div class="line">        echo <span class="stringliteral">&#39;&lt;/tr&gt;&#39;</span>;</div>
<div class="line">        <span class="keywordflow">foreach</span> ($workshops as $w)</div>
<div class="line">        {</div>
<div class="line">                $rows = $DB-&gt;query(<span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                        SELECT w.wid,w.title,</span></div>
<div class="line"><span class="stringliteral">                                (SELECT COUNT(*) FROM table_users u WHERE</span></div>
<div class="line"><span class="stringliteral">                                        EXISTS (SELECT * FROM table_edition_users eu  WHERE u.uid=eu.uid AND edition=$1 AND qualified&gt;0) AND</span></div>
<div class="line"><span class="stringliteral">                                        EXISTS (SELECT * FROM table_workshop_users wu WHERE u.uid=wu.uid AND wu.wid=w.wid AND participant&gt;=$5) AND</span></div>
<div class="line"><span class="stringliteral">                                        EXISTS (SELECT * FROM table_workshop_users wu WHERE u.uid=wu.uid AND wu.wid=$2 AND participant&gt;=$5)) AS cnt</span></div>
<div class="line"><span class="stringliteral">                        FROM table_workshops w</span></div>
<div class="line"><span class="stringliteral">                        WHERE edition=$1 AND w.type=$3 AND w.status=$4</span></div>
<div class="line"><span class="stringliteral">                        ORDER BY w.title&#39;</span>,</div>
<div class="line">                        <a class="code" href="utils_8php.html#a86acce3c002ca1af709fd1b04f2f82fa">getOption</a>(<span class="stringliteral">&#39;currentEdition&#39;</span>), $w[<span class="stringliteral">&#39;wid&#39;</span>], <a class="code" href="enum_8php.html#a11cd73ec04448245e92daedfab9c2bdd">enumBlockType</a>(<span class="stringliteral">&#39;workshop&#39;</span>)-&gt;<span class="keywordtype">id</span>, <a class="code" href="enum_8php.html#a5fba087a3870146b12b7b12c9bfc7d11">enumBlockStatus</a>(<span class="stringliteral">&#39;accepted&#39;</span>)-&gt;<span class="keywordtype">id</span>, <a class="code" href="enum_8php.html#af4fcf7a20cf66ed8f77cae36bc444b83">enumParticipantStatus</a>(<span class="stringliteral">&#39;accepted&#39;</span>)-&gt;<span class="keywordtype">id</span></div>
<div class="line">                );</div>
<div class="line"></div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;tr class=&quot;&#39;</span>. $class .<span class="stringliteral">&#39;&quot; id=&quot;w&#39;</span>. $w[<span class="stringliteral">&#39;wid&#39;</span>]. <span class="stringliteral">&#39;&quot;&gt;&#39;</span>;</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;td&gt;&lt;b&gt;&#39;</span>. $w[<span class="stringliteral">&#39;wid&#39;</span>] .<span class="stringliteral">&#39;&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&#39;</span>. $w[<span class="stringliteral">&#39;title&#39;</span>] .<span class="stringliteral">&#39;&lt;/td&gt;&#39;</span>;</div>
<div class="line">                $tdclass = <span class="stringliteral">&#39;third&#39;</span>;</div>
<div class="line">                <span class="keywordflow">foreach</span> ($rows as $row)</div>
<div class="line">                {</div>
<div class="line">                        echo <span class="stringliteral">&#39;&lt;td class=&quot;&#39;</span>. $tdclass .<span class="stringliteral">&#39;&quot; id=&quot;w&#39;</span>.$row[<span class="stringliteral">&#39;wid&#39;</span>].<span class="stringliteral">&#39;_w&#39;</span>.$w[<span class="stringliteral">&#39;wid&#39;</span>].<span class="stringliteral">&#39;&quot;&gt;&#39;</span>;</div>
<div class="line">                        <span class="keywordflow">if</span> ($row[<span class="stringliteral">&#39;wid&#39;</span>] == $w[<span class="stringliteral">&#39;wid&#39;</span>])</div>
<div class="line">                                echo <span class="stringliteral">&#39;&lt;span class=&quot;diagonal&quot;&gt;&#39;</span>;</div>
<div class="line">                        echo intval($row[<span class="stringliteral">&#39;cnt&#39;</span>]);</div>
<div class="line">                        <span class="keywordflow">if</span> ($row[<span class="stringliteral">&#39;wid&#39;</span>] == $w[<span class="stringliteral">&#39;wid&#39;</span>])</div>
<div class="line">                                echo <span class="stringliteral">&#39;&lt;/span&gt;&#39;</span>;</div>
<div class="line">                        echo  <span class="stringliteral">&#39;&lt;/td&gt;&#39;</span>;</div>
<div class="line">                        $tdclass = ($tdclass==<span class="stringliteral">&#39;even&#39;</span>)?<span class="stringliteral">&#39;odd&#39;</span>:(($tdclass==<span class="stringliteral">&#39;odd&#39;</span>)?<span class="stringliteral">&#39;third&#39;</span>:<span class="stringliteral">&#39;even&#39;</span>);</div>
<div class="line">                }</div>
<div class="line">                echo <span class="stringliteral">&#39;&lt;/tr&gt;&#39;</span>;</div>
<div class="line">                $class = ($class==<span class="stringliteral">&#39;even&#39;</span>)?<span class="stringliteral">&#39;odd&#39;</span>:(($class==<span class="stringliteral">&#39;odd&#39;</span>)?<span class="stringliteral">&#39;third&#39;</span>:<span class="stringliteral">&#39;even&#39;</span>);</div>
<div class="line">        }</div>
<div class="line">        echo  <span class="stringliteral">&#39;&lt;/table&gt;&#39;</span>;</div>
<div class="line"></div>
<div class="line">        $wids = array();</div>
<div class="line">        <span class="keywordflow">foreach</span> ($workshops as $w)  $wids[]= $w[<span class="stringliteral">&#39;wid&#39;</span>];</div>
<div class="line">        $PAGE-&gt;js .= <span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                var wids = [&#39;</span>. implode($wids, <span class="charliteral">&#39;,&#39;</span>) .<span class="stringliteral">&#39;];</span></div>
<div class="line"><span class="stringliteral">                var selected = {};</span></div>
<div class="line"><span class="stringliteral">                function redrawSelected()</span></div>
<div class="line"><span class="stringliteral">                {</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">                        for (var i=0; i&lt;wids.length; i++) {</span></div>
<div class="line"><span class="stringliteral">                                $(&quot;#w&quot;+wids[i]).removeClass(&quot;selected&quot;);</span></div>
<div class="line"><span class="stringliteral">                                for (var j=0; j&lt;wids.length; j++) {</span></div>
<div class="line"><span class="stringliteral">                                        $(&quot;#w&quot;+wids[i]+&quot;_w&quot;+wids[j]).removeClass(&quot;selected&quot;);</span></div>
<div class="line"><span class="stringliteral">                                }</span></div>
<div class="line"><span class="stringliteral">                        }</span></div>
<div class="line"><span class="stringliteral">                        for (var i in selected) {</span></div>
<div class="line"><span class="stringliteral">                                $(&quot;#&quot;+i).addClass(&quot;selected&quot;);</span></div>
<div class="line"><span class="stringliteral">                                for (var j=0; j&lt;wids.length; j++) {</span></div>
<div class="line"><span class="stringliteral">                                        $(&quot;#&quot;+i+&quot;_w&quot;+wids[j]).addClass(&quot;selected&quot;);</span></div>
<div class="line"><span class="stringliteral">                                        //$(&quot;#w&quot;+wids[j]+&quot;_&quot;+i).addClass(&quot;selected&quot;);</span></div>
<div class="line"><span class="stringliteral">                                }</span></div>
<div class="line"><span class="stringliteral">                        }</span></div>
<div class="line"><span class="stringliteral">                }</span></div>
<div class="line"><span class="stringliteral">        &#39;</span>;</div>
<div class="line">        $PAGE-&gt;jsOnLoad .= <span class="stringliteral">&#39;</span></div>
<div class="line"><span class="stringliteral">                for (var i=0; i&lt;wids.length; i++)</span></div>
<div class="line"><span class="stringliteral">                        $(&quot;#w&quot;+wids[i]).click(function(){</span></div>
<div class="line"><span class="stringliteral">                                if (this.id in selected) {</span></div>
<div class="line"><span class="stringliteral">                                        delete selected[this.id]; redrawSelected();</span></div>
<div class="line"><span class="stringliteral">                                }</span></div>
<div class="line"><span class="stringliteral">                                else {</span></div>
<div class="line"><span class="stringliteral">                                        selected[this.id] = true; redrawSelected();</span></div>
<div class="line"><span class="stringliteral">                                }</span></div>
<div class="line"><span class="stringliteral">                        });</span></div>
<div class="line"><span class="stringliteral">        &#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a63074bc210dc044f5dc0fe9f5f334eb1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">sqlUserIsQualified </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$edition</em> = <code>null</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="summary_8php_source.html#l00245">245</a> of file <a class="el" href="summary_8php_source.html">summary.php</a>.</p>

<p>Referenced by <a class="el" href="summary_8php_source.html#l00191">actionListDailyCounts()</a>, and <a class="el" href="summary_8php_source.html#l00096">actionListPersonalData()</a>.</p>
<div class="fragment"><div class="line">{</div>
<div class="line">        <span class="keywordflow">if</span> (is_null($edition))</div>
<div class="line">                $edition = <a class="code" href="utils_8php.html#a86acce3c002ca1af709fd1b04f2f82fa">getOption</a>(<span class="stringliteral">&#39;currentEdition&#39;</span>);</div>
<div class="line">        <span class="keywordflow">return</span> <span class="stringliteral">&#39; EXISTS (SELECT * FROM table_edition_users eu WHERE eu.uid=u.uid AND eu.qualified=1</span></div>
<div class="line"><span class="stringliteral">                AND eu.edition=&#39;</span>. intval($edition) .<span class="stringliteral">&#39;) &#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 8 2013 17:44:57 for wwwApp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
